package java8;

class Hero{
	String name;
	int age;
	
	public void hi() {
		System.out.println("姓名"+name);
		System.out.println("年龄"+age);
		
		Bag bao=new Bag();
		bao.num=4;
		System.out.println("包里有几个？"+bao.num);
	}
	
	//内部类
	private class Bag{
		int num;
		Object sz[]=new Object[6];
	}
	
}


public class Test1 {
	
	public static void main(String[] args) {
		Hero obj=new Hero();
		obj.hi();
	}
}
